home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr49
/
cuj0593.zip
/
1105098A
< prev
next >
Wrap
Text File
|
1993-05-16
|
468b
|
25 lines
/* copy2.c */
#include <stdio.h>
#include <stdlib.h>
main(int argc, char *argv[])
{
char s[BUFSIZ];
/* Open optional input file */
if (argc > 1)
if (freopen(argv[1],"r",stdin) == NULL)
return EXIT_FAILURE;
/* Open optional output file */
if (argc > 2)
if (freopen(argv[2],"w",stdout) == NULL)
return EXIT_FAILURE;
while (gets(s))
puts(s);
return EXIT_SUCCESS;
}